/*
 * inotify-sync - a simple file synchronizer and file system watcher
 * Copyright (C) 2010-2011, inotify-sync developers and inotify-sync contributors
 * Copyright (C) 2010-2011, Cohesion Network Security Studio
 *
 * inotify-sync is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * inotify-sync is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with inotify-sync; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef PROFILE
#define PROFILE

#include <string>
#include <vector>
#include <stdio.h>

using namespace std;

#define RSYNC		1
#define ASYNC		2
#define NSYNC		3

#define STD		1
#define XML		2

class Profile
{
public:
	Profile(string profile_name,
		unsigned short sync_mode,
		unsigned short log_mode,
		string log_path,
		bool watch_hide,
		string src_path,
		string dest_path,
		vector<string> ignore_path_vec,
		bool sync_create_file,
		bool sync_create_dir,
		bool sync_delete,
		bool sync_modify,
		bool sync_moved_from,
		bool sync_moved_to,
		bool sync_move_inside);
	Profile();
	virtual ~Profile();

	void print();

	string get_profile_name()const;
	void set_profile_name(string profile_name);

	unsigned short get_sync_mode()const;
	const char* get_sync_mode_cstr()const;
	string get_sync_mode_str()const;
	void set_sync_mode(unsigned short sync_mode);

	unsigned short get_log_mode()const;
	const char* get_log_mode_cstr()const;
	string get_log_mode_str()const;
	void set_log_mode(unsigned short log_mode);

	string get_log_path()const;
	void set_log_path(string log_path);

	bool get_watch_hide()const;
	void set_watch_hide(bool watch_hide);

	string get_src_path()const;
	void set_src_path(string src_path);

	string get_dest_path()const;
	void set_dest_path(string dest_path);

	vector<string> get_ignore_path_vec()const;
	void set_ignore_path_vec(vector<string>& ignore_path_vec);
	void add_ignore_path(const char* ignore_path);

	string get_tmp_path()const;

	bool get_sync_create_file()const;
	void set_sync_create_file(bool sync_create_file);

	bool get_sync_create_dir()const;
	void set_sync_create_dir(bool sync_create_dir);

	bool get_sync_delete()const;
	void set_sync_delete(bool sync_delete);

	bool get_sync_modify()const;
	void set_sync_modify(bool sync_modify);

	bool get_sync_moved_from()const;
	void set_sync_moved_from(bool sync_moved_from);

	bool get_sync_moved_to()const;
	void set_sync_moved_to(bool sync_moved_to);

	bool get_sync_move_inside()const;
	void set_sync_move_inside(bool sync_move_inside);
#ifndef UT
protected:
#endif
#ifndef UT
private:
#endif
	const char* y_or_n(bool val)const;

	string profile_name;
	unsigned short sync_mode;
	unsigned short log_mode;
	string log_path;
	bool watch_hide;
	string src_path;
	string dest_path;
	vector<string> ignore_path_vec;
	bool sync_create_file;
	bool sync_create_dir;
	bool sync_delete;
	bool sync_modify;
	bool sync_moved_from;
	bool sync_moved_to;
	bool sync_move_inside;
};

#endif
